package com.example.demo.service.impl;

import com.example.demo.dao.AfterUserDao;
import com.example.demo.pojo.User;
import com.example.demo.service.AfterUserService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("afterUserService")
public class AfterUserServiceImpl implements AfterUserService{
    @Resource
    private AfterUserDao afterUserDao;

    @Override
    public int deleteByPrimaryKey(Integer userid) {
        return afterUserDao.deleteByPrimaryKey(userid);
    }

    @Override
    public int insert(User record) {
        return afterUserDao.insert(record);
    }

    @Override
    public int updateByPrimaryKey(User record) {
        return afterUserDao.updateByPrimaryKey(record);
    }

    @Override
    public Page<User> getAll(Integer pageNum,Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        return afterUserDao.getAll();
    }


}
